//
//  User.h
//  NewsReader
//
//  Created by blacksun on 10-10-18.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

extern NSString * NSCustomError;

#define kUser_UserId			@"userId"
#define kUser_DevicdeId			@"deviceId"
#define kUser_Email				@"email"
#define kUser_NikeName			@"nikeName"
#define kUser_Passwd			@"passwd"
#define kUser_Area				@"area"
#define kUser_Sections			@"sections"
#define kUser_LastLoginDate		@"lastLoginDate"
#define kUser_feedSize			@"feedSizePerRequest"
#define kUser_feedDays			@"saveFeedDays"
#define kUser_requestImage		@"requestImage"
#define kUser_needUpdateSections @"needUpdateSections"
#define kUser_optimizeContent	 @"optimizeContent"

#define kUser_defaultUserId		@"defaultUserId"
#define kDefaultSections		@"defaultSections"
#define kUserId					@"userId"


#define kRequestTimeOutOnLoading	4.0

@interface User : NSObject<NSCoding> {
	NSString *userId;
	NSString *deviceId;
	NSString *email;
	NSString *nickName;
	NSString *passwd;
	NSString *area;
	NSMutableArray *sectionIds;
	NSMutableArray *mySections;
	NSString *lastLoginDate;
	NSInteger feedSizePerRequest;
	NSInteger saveFeedDays;
	BOOL requestImage;
	BOOL needUpdateSections;
	BOOL optimizeContent;
	NSMutableArray *httpUtils;
}

//匿名注册
- (BOOL)anonymousRegister;
- (BOOL)updateMySections;
@property (nonatomic ,copy) NSString *userId;
@property (nonatomic ,copy) NSString *deviceId;
@property (nonatomic ,copy) NSString *email;
@property (nonatomic ,copy) NSString *nickName;
@property (nonatomic ,copy) NSString *passwd;
@property (nonatomic ,copy) NSString *area;
@property (nonatomic ,retain) NSMutableArray *sectionIds;
@property (nonatomic ,copy) NSString *lastLoginDate;
@property (nonatomic ,retain) NSMutableArray *mySections;
@property (nonatomic, assign) NSInteger feedSizePerRequest;
@property (nonatomic, assign) NSInteger saveFeedDays;
@property (nonatomic, assign) BOOL requestImage;
@property (nonatomic, assign) BOOL needUpdateSections;
@property (nonatomic, assign) BOOL optimizeContent;
@property (nonatomic ,retain) NSMutableArray *httpUtils;
@end
